div {
    border: 1px solid blue;
    width: 100px;
    height: 400px;
    background: transparent url(./images/dog.jpg) 0 0 no-repeat;
    background-size: contain;
}